<!--
HTML片段，嵌入弹窗中使用
注：在需要使用id的地方，请取st_jsid参数<?php echo $_GET['st_jsid']; ?>做前缀，避免影响到主页面
-->
<!--添加权限-->
<form action="{%:U('/admin/admin/saverole')%}" onsubmit="return false" stverify="true" erroappend="true" ajaxpost="true" method="POST">
    <input class="input" type="text" name="id" hidden='true' value="{%$roleInfo['id']%}"/>
  <table class="table table-listing">
    <table class="table table-listing table-hovered">
      <thead class="thead-gray">
      <tr>
        <th>编号</th>
        <th>名称</th>
        <th>权限结构</th>
        <th>动作名称</th>
        <th>是否显示</th>
      </tr>
      </thead>
      <tbody>         
        {%notempty name="atomList"%}
          {%foreach name="atomList" item="vo" key="keys"%}        
          <tr>
            <td><input type="checkbox" class="js-toggleall-target" name="atom[]" value="{%$vo.id%}"
                     {%present name="atomArray[$vo['id']]"%} checked {%/present%} >{%$vo.id%}</td>
            <td>
              {%$vo.name%}
            </td>
            <td>
              {%$vo.className%}
            </td>
            <td>
              {%$vo.func_name%}
            </td>
            <td>{%if condition="($vo['hidden_type'] eq 1)"%}<span class="text-green">列表显示</span>{%else /%}<span class="text-red">列表隐藏</span>{%/if%}</td>
          </tr>
        {%/foreach%}
       {%/notempty%}
      </tbody>
    </table>
  </table> 
</form>